home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / TXT / PASM.TXT < prev    next >
Text File  |  1997-01-07  |  2KB  |  45 lines

  1. PASM - Pre ASMbler
  2. ------------------
  3.  
  4.   This pre-comlier allows for strings within ASM files.  It simple looks for
  5. "" and exchanges it with an offset to a data segment where the string is
  6. placed.  Usage:
  7.   PASM file.asm
  8.  
  9.   It will go thru all included files and creat a massive ASM.TMP file
  10. which is the final version that can be compiled.  Another output file called
  11. _STR_.TMP holds all the strings and must be included into the input ASM file.
  12. But if PASM sees the include it will try and use it.  Therefore this include
  13. must be set as #include _str_.tmp and when PASM sees it, it just removes the
  14. # and moves on.  Then MASM can compile it.  The only problem with this is
  15. that if there are any errors within the ASM file you will not have any clue
  16. where it was from (depending on how many files make the actual program).
  17.   You can edit the ASM.TMP to find out but it makes things a little harder.
  18. PASM also changes \n into 13,10 and \\ into a \ and all other C type
  19. conversions.
  20.  
  21. All of this is done for you when you include qlib.inc in your programs
  22. so just use the strings.
  23.  
  24. Here are some examples:
  25.   mov edx,"\n Hello \n"
  26.   mov ah,9
  27.   int 21h
  28.  
  29.   invoke printf,"Hello, world.  AX=%w\n",ax
  30.  
  31.  
  32. Here are some newer bugs found with PASM:
  33.  - PASM bugs : can't use forward references
  34.              : using signed numbers is very unpredictable
  35.      ie: callp proc,ax
  36.    When ax is a signed number it will always be zero extended
  37.     to a 32bit number. (even if you ASSUME ax:sbyte)
  38.    Just remember that everything is ZERO extended to 32bits.
  39.    Remedy : Use C for programming, ASM programming sux for BIG projects
  40.             or you can use INVOKE but be careful
  41.  
  42. See pasm.c(the source) for improvements...
  43. See masmbugs.txt for more info...
  44.  
  45.